<?php

namespace XLite\Model;

/**
 * The "product" model class
 *
 * @see   ____class_see____
 * @since 1.0.0
 *
 * @Entity (repositoryClass="\XLite\Model\Repo\Product")
 * @Table  (name="products",
 *      indexes={
 *          @Index (name="price", columns={"price"}),
 *          @Index (name="sku", columns={"sku"}),
 *          @Index (name="weight", columns={"weight"}),
 *          @Index (name="free_shipping", columns={"free_shipping"}),
 *          @Index (name="clean_url", columns={"clean_url"}),
 *          @Index (name="customerArea", columns={"enabled","arrivalDate"})
 *      }
 * )
 * @HasLifecycleCallbacks
 */
class Product extends \XLite\Module\CDev\FeaturedProducts\Model\Product implements \XLite\Model\Base\IOrderItem
{
    /**
     * Translations (relation). AUTOGENERATED
     *
     * @var    \Doctrine\Common\Collections\ArrayCollection
     * @access protected
     * @see    ____func_see____
     * @since  1.0.0
     *
     * @OneToMany (targetEntity="XLite\Model\ProductTranslation", mappedBy="owner", cascade={"persist","remove"})
     */
    protected $translations;

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setName($value)
    {
        return $this->getTranslation($this->editLanguage)->setName($value);
    }

    /**
     * Translation getter. AUTOGENERATED
     *
     * @return string
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getDescription()
    {
        return $this->getSoftTranslation()->getDescription();
    }

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setDescription($value)
    {
        return $this->getTranslation($this->editLanguage)->setDescription($value);
    }

    /**
     * Translation getter. AUTOGENERATED
     *
     * @return string
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getBriefDescription()
    {
        return $this->getSoftTranslation()->getBriefDescription();
    }

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setBriefDescription($value)
    {
        return $this->getTranslation($this->editLanguage)->setBriefDescription($value);
    }

    /**
     * Translation getter. AUTOGENERATED
     *
     * @return string
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getMetaTags()
    {
        return $this->getSoftTranslation()->getMetaTags();
    }

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setMetaTags($value)
    {
        return $this->getTranslation($this->editLanguage)->setMetaTags($value);
    }

    /**
     * Translation getter. AUTOGENERATED
     *
     * @return string
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getMetaDesc()
    {
        return $this->getSoftTranslation()->getMetaDesc();
    }

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setMetaDesc($value)
    {
        return $this->getTranslation($this->editLanguage)->setMetaDesc($value);
    }

    /**
     * Translation getter. AUTOGENERATED
     *
     * @return string
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getMetaTitle()
    {
        return $this->getSoftTranslation()->getMetaTitle();
    }

    /**
     * Translation setter. AUTOGENERATED
     *
     * @param string $value value to set
     *
     * @return void
     * @access public
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function setMetaTitle($value)
    {
        return $this->getTranslation($this->editLanguage)->setMetaTitle($value);
    }

    /**
     * Get product_id
     *
     * @return uinteger $productId
     */
    public function getProductId()
    {
        return $this->product_id;
    }

    /**
     * Set price
     *
     * @param decimal $price
     */
    public function setPrice($price)
    {
        $this->price = $price;
    }

    /**
     * Set sale_price
     *
     * @param decimal $salePrice
     */
    public function setSalePrice($salePrice)
    {
        $this->sale_price = $salePrice;
    }

    /**
     * Get sale_price
     *
     * @return decimal $salePrice
     */
    public function getSalePrice()
    {
        return $this->sale_price;
    }

    /**
     * Set sku
     *
     * @param string $sku
     */
    public function setSku($sku)
    {
        $this->sku = $sku;
    }

    /**
     * Set enabled
     *
     * @param boolean $enabled
     */
    public function setEnabled($enabled)
    {
        $this->enabled = $enabled;
    }

    /**
     * Get enabled
     *
     * @return boolean $enabled
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Set weight
     *
     * @param decimal $weight
     */
    public function setWeight($weight)
    {
        $this->weight = $weight;
    }

    /**
     * Set free_shipping
     *
     * @param boolean $freeShipping
     */
    public function setFreeShipping($freeShipping)
    {
        $this->free_shipping = $freeShipping;
    }

    /**
     * Set clean_url
     *
     * @param string $cleanUrl
     */
    public function setCleanUrl($cleanUrl)
    {
        $this->clean_url = $cleanUrl;
    }

    /**
     * Get clean_url
     *
     * @return string $cleanUrl
     */
    public function getCleanUrl()
    {
        return $this->clean_url;
    }

    /**
     * Set javascript
     *
     * @param text $javascript
     */
    public function setJavascript($javascript)
    {
        $this->javascript = $javascript;
    }

    /**
     * Get javascript
     *
     * @return text $javascript
     */
    public function getJavascript()
    {
        return $this->javascript;
    }

    /**
     * Set date
     *
     * @param integer $date
     */
    public function setDate($date)
    {
        $this->date = $date;
    }

    /**
     * Get date
     *
     * @return integer $date
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Add featuredProducts
     *
     * @param XLite\Module\CDev\FeaturedProducts\Model\FeaturedProduct $featuredProducts
     */
    public function addFeaturedProducts(\XLite\Module\CDev\FeaturedProducts\Model\FeaturedProduct $featuredProducts)
    {
        $this->featuredProducts[] = $featuredProducts;
    }

    /**
     * Get featuredProducts
     *
     * @return Doctrine\Common\Collections\Collection $featuredProducts
     */
    public function getFeaturedProducts()
    {
        return $this->featuredProducts;
    }

    /**
     * Add categoryProducts
     *
     * @param XLite\Model\CategoryProducts $categoryProducts
     */
    public function addCategoryProducts(\XLite\Model\CategoryProducts $categoryProducts)
    {
        $this->categoryProducts[] = $categoryProducts;
    }

    /**
     * Get categoryProducts
     *
     * @return Doctrine\Common\Collections\Collection $categoryProducts
     */
    public function getCategoryProducts()
    {
        return $this->categoryProducts;
    }

    /**
     * Add order_items
     *
     * @param XLite\Model\OrderItem $orderItems
     */
    public function addOrderItems(\XLite\Model\OrderItem $orderItems)
    {
        $this->order_items[] = $orderItems;
    }

    /**
     * Get order_items
     *
     * @return Doctrine\Common\Collections\Collection $orderItems
     */
    public function getOrderItems()
    {
        return $this->order_items;
    }

    /**
     * Add images
     *
     * @param XLite\Model\Image\Product\Image $images
     */
    public function addImages(\XLite\Model\Image\Product\Image $images)
    {
        $this->images[] = $images;
    }

    /**
     * Get images
     *
     * @return Doctrine\Common\Collections\Collection $images
     */
    public function getImages()
    {
        return $this->images;
    }

    /**
     * Set inventory
     *
     * @param XLite\Model\Inventory $inventory
     */
    public function setInventory(\XLite\Model\Inventory $inventory)
    {
        $this->inventory = $inventory;
    }

    /**
     * Add classes
     *
     * @param XLite\Model\ProductClass $classes
     */
    public function addClasses(\XLite\Model\ProductClass $classes)
    {
        $this->classes[] = $classes;
    }

    /**
     * Get classes
     *
     * @return Doctrine\Common\Collections\Collection $classes
     */
    public function getClasses()
    {
        return $this->classes;
    }
}